<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/4/26
 * Time: 18:06
 */

namespace Application\Handlers;


use Application\Models\Article;
use BlogServices\ArticleServiceIf;

class ArticleHandler implements ArticleServiceIf
{

    /**
     * @param string $where
     * @param int $offset
     * @param int $limit
     * @return \BlogServices\Article[]
     */
    public function GetArticles($where, $offset, $limit)
    {
//        return [1,2];
       return (new Article())->GetArticles($where,$offset,$limit);
    }

    /**
     * @param int $catid
     * @param int $offset
     * @param int $limit
     * @return \BlogServices\Article[]
     */
    public function GetArticlesByCatId($catid, $offset, $limit)
    {
        // TODO: Implement GetArticlesByCatId() method.
    }

    /**
     * @param int $id
     * @return \BlogServices\Article
     */
    public function GetArticleById($id)
    {
       return (new Article)->GetArticleById(1);
    }

    /**
     * @param string $where
     * @return int
     */
    public function GetArticleTotal($where)
    {

    }
}